package com.tsunami.authority.entity.admin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.tsunami.base.entity.Entity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

/**
 * 用户和租户中间表
 *
 * @author lx
 * @date 2024/3/25 16:26
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName("tnm_user_tenant")
@Schema(description = "用户租户")
public class UserTenant extends Entity<Long> {

    @Schema(description = "租户号")
    @TableField(value = "tenant_id")
    private Long tenantId;

    @Schema(description = "用户ID")
    @TableField(value = "user_id")
    private Long userId;

    @Schema(description = "是否首选")
    @TableField(value = "activation")
    private Boolean activation;
}
